<?php
	
	include("config.php");
	
	$id = $_GET["id"];
	
	$result=mysql_query("SELECT * FROM section WHERE course_id = '".$id."'");
	$row=mysql_fetch_array($result);
	
	//echo $row['course_id']."_".$row['section_number'];
	
	echo "<form action='' name='sectionForm'>";
	echo "<SELECT NAME='course' SIZE='10' onchange='sectionSelectorHandler(document.sectionForm.course.value);' MULTIPLE>";
	echo "<OPTION SELECTED value='".$row['course_id']."_".$row['section_number']."'>".$row['section_number']."- timeslot: ".$row['time_slot']."</OPTION>";
	
	while ($row=mysql_fetch_array($result))
	{
		//echo "<OPTION>hello</OPTION>";
		echo "<OPTION value='".$row['course_id']."_".$row['section_number']."'>".$row['section_number']."- timeslot: ".$row['time_slot']."</OPTION>";
		
	}
	
	echo "</SELECT>";
	echo "</form>";
?>